﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InHD.model
{
    class Account
    {
        #region Creation
        public static Account CreateNewAccount()
        {
            return new Account();
        }

        public static Account CreateAccount(
            string unk,
            long code,
            string atype,
            int level,
            int parentAcc,
            string desc,
            double tkc_balance,
            double tkn_balance,
            DateTime lastAccess)
        {
            return new Account
            {
                AccountUNK = unk,
                AccountCode = code,
                AccountType =  atype,
                Level = level,
                ParentAccount = parentAcc,
                Description = desc,
                TKCBalance = tkc_balance,
                TKNBalance = tkn_balance,
                LastAccess =  DateTime.Now
            };
        }

        protected Account()
        {
        }

        #endregion // Creation

        #region State Properties

        public string AccountUNK { get; set; }

        public string AccountType { get; set; }

        public long AccountCode { get; set; }

        public int Level { get; set; }

        public int ParentAccount { get; set; }

        public string Description { get; set; }

        public double TKCBalance { get; set; }

        public double TKNBalance { get; set; }

        public DateTime LastAccess { get; set; }

        #endregion // State Properties

    }
}
